One Wrong VLAN Broke My Entire Home Assistant Energy Dashboard
A small network configuration mistake took down both my P1 and solar data. The dashboard was only the symptom — the real problem was one switch port.
Home Assistant · Networking
My energy dashboard is one of those parts of my smart home that normally just sits there and works.
It combines live grid power from a HomeWizard P1 Meter with solar production from my SMA inverter. On top of that data, I built my own Energy Pro dashboard with live power flows, historical charts, import and export data, and metrics such as self-consumption and self-sufficiency.
Then, shortly after doing some network cleanup, almost all of it stopped working.
Both my P1 data and my solar data disappeared from Home Assistant. The Power Flow Card no longer had the information it needed, historical energy views stopped behaving correctly, and several derived values became useless. At first glance, it looked like an Energy Dashboard problem.
It wasn't. It was one switch port.
The network behind the dashboard
The interesting part of this problem is that the dashboard itself sits several layers above the thing that actually broke.
My home network is segmented into different VLANs. Home Assistant lives in my Servers VLAN, while devices such as the HomeWizard P1 Meter and SMA inverter live in a separate IoT VLAN.
The firewall intentionally allows the Servers network to initiate connections towards IoT, so Home Assistant can read those devices locally. IoT devices, on the other hand, aren't allowed to freely initiate new connections back into the more trusted networks. There is one slightly unusual detail in this setup.
I still use TP-Link Deco access points, and they run in Access Point Mode. In my setup, the Decos don't assign different VLANs to clients themselves.
Instead, the native VLAN configured on the UniFi switch port feeding an access point determines which network its clients end up in.
So the access point used by my energy devices has to be connected to a switch port whose native network is the IoT VLAN.
That switch-port configuration is therefore not just administrative housekeeping. It is part of the actual data path between my energy hardware and Home Assistant.
What went wrong
This happened just after I had been cleaning up another network issue involving my Deco access points, Ethernet backhaul and an STP loop. (still haven’t really figured that one out, I will surely write updates about this problem too")
During that work I had already been changing and checking switch-port assignments. The network eventually looked healthy again: the loop was gone, Home Assistant and my homelab server were reachable, and UniFi no longer reported active anomalies. But one port was wrong.
The switch port connected to the dedicated IoT access point was no longer using IoT / VLAN 30 as its native network.
After I had remotely turned off the switch port and turned it back on, the port didn’t automatically use the IoT VLAN anymore.
That meant the P1 Meter and SMA inverter were no longer landing in the network where they were supposed to be.
And that immediately explained something important: two completely different Home Assistant integrations had failed at roughly the same time.
It was possible that HomeWizard had broken. It was possible that the SMA integration had broken. It was much less likely that both had independently broken at exactly the same moment.
They did, however, share one dependency: the network path.
Fixing the network
The first real fix therefore happened in UniFi, not in Home Assistant.
I changed the switch port back so that the IoT access point once again used VLAN 30 as its native network.
After that, both the P1 Meter and the SMA inverter received addresses from the correct IoT subnet again.
At that point the Layer 2, VLAN and DHCP side of the problem was fixed. But that didn't mean the entire system immediately recovered.
And that turned out to be one of the more useful lessons from this incident.
Restoring network connectivity is not necessarily the same thing as restoring the complete application stack.
One device came back. The other didn't.
The SMA inverter recovered fairly quickly.
Its values reappeared in Home Assistant and live solar power started updating again. That was useful evidence in itself: Home Assistant in the Servers VLAN could clearly communicate with devices in the IoT VLAN again.
The firewall and inter-VLAN routing were therefore doing what they were supposed to do. The HomeWizard P1 Meter took longer.
Instead of staring at the dashboard, I went down one layer and opened:
Developer Tools → States on Home Assistant
The realtime power entity “sensor.p1_meter_vermogen” was still showing “unavailable”. The phase power sensors were unavailable too.
Interestingly, the entities themselves still existed. Home Assistant still knew what they were, and their attributes included restored: true, but no new live state was coming in.
Eventually the P1 integration reconnected as well. Now both physical data sources were online again. Yet the dashboard still wasn't completely right.
The dashboard was still broken
This was the point where it would have been very tempting to start deleting Energy Dashboard sources, repairing statistics or rebuilding parts of the configuration.
I didn't. Instead, I went down the stack again.
The Energy Dashboard doesn't only depend on live Watt values. Historical energy calculations also rely on cumulative energy entities such as “sensor.p1_meter_energie_import” and “sensor.p1_meter_energie_export”.
These entities were alive and still had the metadata Home Assistant expects from cumulative energy meters:
"state_class: total_increasing"
"device_class: energy"
"unit_of_measurement: kWh"So next I checked Developer Tools → Statistics
Home Assistant still recognised the statistics, the recorder was the source, the unit was correct, and most importantly:
Issue: No issueThe data model itself was healthy. That was enough reason not to start ripping things apart. No deleting entities. No recreating Energy sources. No manual manipulation of historical statistics. No database surgery.
The underlying data was telling me that none of those things were necessary.
The final piece: restart Home Assistant
Even with the integrations alive and the statistics layer looking healthy, the Energy Pro dashboard still wasn't completely recovering.
So I restarted Home Assistant and almost immediately everything came back. lol
The Power Flow Card once again showed solar generation, grid power and calculated house consumption. Historical import and export values returned. The graphs populated again, and my self-consumption and self-sufficiency calculations were usable again.
I can't say with certainty which internal Home Assistant component needed that restart though.
The entities and statistics were already healthy before it, so the evidence doesn't point towards corrupted historical data. It could have been stale state somewhere around an integration, coordinator, recorder or frontend layer. But I dont really know.
What I can say is that the restart forced the stack to initialise cleanly again, and the dashboard immediately recovered afterwards :)
Crazy what a restart can do right?
The useful part of breaking it
The most valuable result wasn't really fixing the dashboard. It was getting a much clearer picture of the dependency chain behind it.
What appears on screen as an “Energy Dashboard” is actually the final layer of a much longer system
UniFi switch port
↓
correct native IoT VLAN
↓
IoT access point
↓
P1 Meter + SMA inverter
↓
inter-VLAN connectivity
↓
Home Assistant integrations
↓
live entities
↓
recorder + statistics
↓
Energy DashboardA failure right at the top of that chain can manifest itself all the way at the bottom as a blank dashboard.
And if I had started troubleshooting from the dashboard upwards, I could easily have wasted time changing perfectly healthy Home Assistant configuration.
What I learned
There are a few things I want to remember from this one.
When multiple unrelated integrations fail simultaneously, look for the dependency they share.
The P1 Meter and SMA inverter failing together was a much stronger clue than either individual error. It was easy to trace the issue back to the wrong VLAN.
A correct IP address only proves part of the recovery.
Once both devices were back in the IoT VLAN, the networking layer was healthy again. That didn't mean every application above it had immediately recovered.
Don't “repair” statistics that aren't broken.
Seeing “No issue” in Developer Tools → Statistics and correct metadata on the cumulative energy sensors was a strong reason to leave the historical data alone.
In a segmented network, switch-port configuration is infrastructure.
Because my Deco’s bridge clients rather than assigning VLANs themselves, changing one native VLAN can silently move an entire group of devices into the wrong network. But that speaks for itself and is not that crazy.
This only happens because I wanted to repurpose those Deco’s instead of buying a Unify AP. But that’s good, now I sometimes run into issues that teach me.
Troubleshoot from the bottom of the stack upwards.
Network placement first. Then connectivity. Then integrations. Then entities. Then statistics. And only then the dashboard.
In the end, nothing was wrong with the P1 Meter. Nothing was wrong with the SMA inverter. My Home Assistant database wasn't corrupt, and the Energy Dashboard configuration wasn't broken.
One access-point uplink was in the wrong VLAN.
The dashboard was just where the problem became visible :)
I know now that when I turn off a swtich port, I have to remember to set the correct VLAN when turning that port back on.
And when the same problem potentially reoccurs in the future, I know that a restart of a system can solve a lottt of problems haha.